<template>
  <div class="container">
    <div class="header">
      <app-header :title="title"></app-header>
    </div>
    <div class="box">
      <div class="box-left">
        <div class="content">
          <el-image
            style="width: 100%; height: 100%;"
            :src="url"
            fit="fill">
          </el-image>
        </div>
        <div class="appointment">
          <div class="country-appointment">
            <div class="country-appointment-header">
              <span>{{ countryAppointmentTitle }}</span>
            </div>
            <el-card class="country-appointment-card">
              <div class="country-appointment-body">
                <div v-for="o in countryAppointmentData" :key="o" class="country-appointment-li">
                  {{'列表内容 ' + o }}
                </div>
              </div>
            </el-card>
          </div>
          <div class="weekly-appointment">
            <div class="weekly-appointment-header">
              <span>{{ weeklyAppointmentTitle }}</span>
            </div>
            <el-card class="weekly-appointment-card">
              <div class="weekly-appointment-body">
                <div v-for="o in weeklyAppointmentData" :key="o" class="weekly-appointment-li">
                  {{'列表内容 ' + o }}
                </div>
              </div>
            </el-card>
          </div>
        </div>
      </div>
      <div class="box-right">
        <div class="book-appointment" @click="$router.push('/itseAppointment')">{{ bookAppointmentTitle }}</div>
      </div>
    </div>
  </div>
</template>

<script>
import AppHeader from '../../components/AppHeader'
export default {
  name: 'BookAppointment',
  components: { AppHeader },
  data () {
    return {
      title: 'Amazon Appointment Tool',
      url: 'https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg',
      countryAppointmentTitle: 'Country\'s Appointment',
      weeklyAppointmentTitle: 'Weekly Appointment',
      bookAppointmentTitle: 'Book Appointment',
      countryAppointmentData: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11],
      weeklyAppointmentData: [1, 2, 3, 4, 5]
    }
  }
}
</script>

<style lang="scss" scoped>
.container {
  display: flex;
  flex-direction: column;
  height: 100%;
  z-index: 1;

  .header {
    flex: none;
    height: 100px;
  }

  .box {
    flex: 1;
    display: flex;
    flex-direction: row;

    &-left {
      width: 60%;
      background-color: #ffffff;

      .content {
        width: 90%;
        height: 200px;
        margin: 0 auto;
        margin-top: 50px;
      }

      .appointment {
        background-color: #ffffff;
        width: 90%;
        height: 300px;
        margin: 0 auto;
        margin-top: 50px;

        .country-appointment {
          width: 35%;
          height: 300px;
          float: left;
          display: flex;
          flex-direction: column;
          border: 1px solid black;
          justify-content: center;
          align-items: center;

          .country-appointment-header {
            flex: none;
            height: 25px;
          }

          .country-appointment-card {
            flex: none;
            height: 250px;
            width: 90%;
            border: 1px solid black;
            overflow-y: scroll;
          }

          .country-appointment-li {
            margin-bottom: 12px;
          }
        }

        .weekly-appointment {
          width: 35%;
          height: 300px;
          float: right;
          display: flex;
          flex-direction: column;
          border: 1px solid black;
          justify-content: center;
          align-items: center;

          .weekly-appointment-header {
            flex: none;
            height: 25px;
          }

          .weekly-appointment-card {
            flex: none;
            height: 250px;
            width: 90%;
            border: 1px solid black;
            overflow-y: scroll;
          }

          .weekly-appointment-li {
            margin-bottom: 12px;
          }
        }
      }
    }

    &-right {
      width: 40%;

      .book-appointment {
        background-color: green;
        width: 200px;
        height: 30px;
        font-size: 16px;
        font-weight: bold;
        color: #ffffff;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 5px;
        margin: 0 auto;
        margin-top: 150px;
        cursor: pointer;
      }
    }
  }
}

</style>

<style lang="scss">

</style>
